/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package modelo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author eltorre
 */
@Embeddable
public class ClientePropietarioObraPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "cliente")
    private int cliente;
    @Basic(optional = false)
    @Column(name = "obra")
    private int obra;

    public ClientePropietarioObraPK() {
    }

    public ClientePropietarioObraPK(int cliente, int obra) {
        this.cliente = cliente;
        this.obra = obra;
    }

    public int getCliente() {
        return cliente;
    }

    public void setCliente(int cliente) {
        this.cliente = cliente;
    }

    public int getObra() {
        return obra;
    }

    public void setObra(int obra) {
        this.obra = obra;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) cliente;
        hash += (int) obra;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ClientePropietarioObraPK)) {
            return false;
        }
        ClientePropietarioObraPK other = (ClientePropietarioObraPK) object;
        if (this.cliente != other.cliente) {
            return false;
        }
        if (this.obra != other.obra) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "modelo.ClientePropietarioObraPK[ cliente=" + cliente + ", obra=" + obra + " ]";
    }
    
}
